          <!-- START OF MAINCOL -->
          <div class="MainCol AddEbookPage">
          	  <h1>轮换图片编辑</h1>
              <span class="NormalFont SmallFont">
                  <?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?> > 轮换图片 > 轮换图片编辑
               </span><br /><br />
              <div class="Titlebox box"><!-- DON'T DELETE --></div>

              <?php if($_slide->hasErrors()):  echo CHtml::errorSummary($_slide); elseif(isPost()): ?>
              <div class="SuccessfulBox Smallbox">
                <span class="Successful"> 图片更改成功保存。</span>
              </div>
              <?php endif; ?>
              
              <?php if(Yii::app()->user->hasFlash('message')) : ?>
              <div class="SuccessfulBox Smallbox">
                <span class="Successful"> <?php echo Yii::app()->user->getFlash('message'); ?></span>
              </div>
              <?php endif; ?>
              
              <?php if(Yii::app()->user->hasFlash('error')) : ?>
              <div class="SaveBox Smallbox">
                <span class="Error"> <?php echo Yii::app()->user->getFlash('error'); ?></span>
              </div>
              <?php endif; ?>
              
              <?= CHtml::form(array('admin/slides/create'), 'POST', array('name' => 'animCreate', 'enctype' => 'multipart/form-data')); ?>
              <div class="Smallbox"><label>描述<span class="Red">*</span></label>
              <?= CHtml::activeTextField($_slide, 'slideDescr', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Smallbox"><label>图片<span class="Red">*</span></label>
              <?= CHtml::activeFileField($_slide, 'uploadedPic', array('class' => 'SmallerBox', 'size' => '32')); ?>
              </div>
              
              <div class="Smallbox"><label>链接<span class="Red">*</span></label>
              <?= CHtml::activeTextField($_slide, 'linkTo', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Smallbox"><label>顺序</label>
              <?= CHtml::activeTextField($_slide, 'slideOrder', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Smallbox"><label>&nbsp;</label>
              	<span style="color: #999;">图片规格: 520 像素 * 165 像素</span>
              </div>
              
              <div class="Smallbox btnBox"><label>&nbsp;</label>
              	  <?= CHtml::submitButton('添加图片', array('title' => '添加图片', 'name' => 'submitPost')); ?>
                  </span>
                  <br class="clear" />
              </div>
              <?= CHtml::endForm(); ?>
              
              <?php foreach($slides as $k => $slide) : ?>
              <?= CHtml::form('', 'POST', array('name' => 'animUpdate'.$slide->slideId, 'enctype' => 'multipart/form-data')); ?>
              <?= CHtml::activeHiddenField($slide, 'slidePic'); ?>
              <?= CHtml::activeHiddenField($slide, 'slideId'); ?>
              <div class="Smallbox"><label>ID</label>
              <?= $slide->slideId; ?>
              </div>
              
              <div class="Smallbox"><label>描述</label>
              <?= CHtml::activeTextField($slide, 'slideDescr', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Smallbox"><label>图片<span class="Red">*</span></label>
              <?= CHtml::activeFileField($slide, 'uploadedPic', array('class' => 'SmallerBox', 'size' => '32')); ?>
              </div>
              <ul class="Lists">
              	  <li>
                  	<span class="ImgBox"><?= CHtml::image($slide->imgPath, $slide->slideDescr, array('width' => 380)); ?></span>
                    <br class="clear" />
                  </li>
             </ul>
              
              <div class="Smallbox"><label>链接</label>
              <?= CHtml::activeTextField($slide, 'linkTo', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Smallbox"><label>顺序</label>
              <?= CHtml::activeTextField($slide, 'slideOrder', array('class' => 'TxtInput')); ?>
              </div>
              
              <div class="Smallbox btnBox"><label>&nbsp;</label>
              	  <?= CHtml::submitButton('保存', array('title' => '保存', 'name' => 'submitPost')); ?>
              	  <span class="Cancel">
                  <span class="SmallFont">或 <?php echo CHtml::link('删除', array('/admin/slides/delete', 'id' => $slide->slideId), array('confirm' => '确定要删除这个轮换图片吗？', 'class' => 'Delete')); ?></span>
                  </span>
                  <br class="clear" />
              </div>
              <?= CHtml::endForm(); ?>
              <?php endforeach; ?>
              
              <div class="Midbox Red SmallFont">带 * 为必填项</div>
              
          </div>
          <!-- END OF MAINCOL -->